Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class com.pacist.diamonds.Alignment

java.lang.Object
  |
  +--com.pacist.diamonds.Alignment

public class Alignment
extends java.lang.Object
implements Direction
Defines commonly used constants for alignments.


Field Summary
static int FILL_BOTH
          Make the cell fill its display area entirely.
static int FILL_HORIZONTAL
          Make the cell wide enough to fill its display area horizontally, but do not change its height.
static int FILL_NONE
          No fill - do not resize the cell.
static int FILL_VERTICAL
          Make the cell tall enough to fill its display area vertically, but do not change its width.
 
Method Summary
static void alignInCell(java.awt.Rectangle r, java.awt.Rectangle cell, int alignment, int fill)
          Aligns a cell in a Rectangle with the specified alignment and fill attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Field Detail

FILL_NONE

public static final int FILL_NONE
No fill - do not resize the cell.

FILL_HORIZONTAL

public static final int FILL_HORIZONTAL
Make the cell wide enough to fill its display area horizontally, but do not change its height.

FILL_VERTICAL

public static final int FILL_VERTICAL
Make the cell tall enough to fill its display area vertically, but do not change its width.

FILL_BOTH

public static final int FILL_BOTH
Make the cell fill its display area entirely.
Method Detail

alignInCell

public static void alignInCell(java.awt.Rectangle r,
                               java.awt.Rectangle cell,
                               int alignment,
                               int fill)
Aligns a cell in a Rectangle with the specified alignment and fill attributes.
Parameters:
r - This is the Rectangle which encloses the cell.
cell - This is the Rectangle which defines the dimensions of your cell.
alignment - Alignment of cell inside r.
fill - How the cell should fill its enclosing rectangle.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD